<template>
	<xa-paper-displayPaper-header :data="data"></xa-paper-displayPaper-header>
	<xa-paper-displayPaper-body :preview="preview" :data="data" @reset_parent="reset_parent"></xa-paper-displayPaper-body>

	<xa-paper-displayPaper-footer :data="data"></xa-paper-displayPaper-footer>
</template>
<script>
	import config from "@/config/config.js";
	import xcHttpUtils from '@/library/xcore/js/XcHttpUtils.js';
	import xcViewUtils from '@/library/xcore/js/XcViewUtils.js';
	import {
		xsStringUtils,
		xsDateUtils,
		xsArrayUtils
	} from 'xstack-for-javascript';

	export default {
		props: {
			data: {
				type: Object,
				default: []
			},
			preview: {
				type: Boolean,
				default: false,
			}
		},
		watch: {
			'data': {
				handler(newVal, oldVal) {
					let that = this;
					console.log('---displaypaper watch data');
					that.public_show();
				},
			},
		},
		emits: ['reset_parent'],
		data() {
			return {
				config: config,
				xsStringUtils: xsStringUtils,
				xsDateUtils: xsDateUtils,
				sp: {},
				sr: {
				},
				control: {}
			}
		},
		created() {
			let that = this;
			that.xinit();
		},
		mounted() {
			let that = this;
			
			that.$nextTick(function() {
				that.public_show();
			});
		},
		methods: {
			xinit() {
				let that = this;
			},
			public_show() {
				let that = this;
			},
			public_reset() {
				let that = this;
				that.public_show();
			},
			reset_parent() {
				let that = this;
				that.$emit("reset_parent");
			}
		}
	}
</script>

<style lang="scss">

</style>